<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>用户注册</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->

  </head>
  
  <body>
  	<center>
  		<h3><font color="#FF6F0">新用户注册</font></h3>
  		  <form action="servlet/RegistServlet" name="form1" method="post">
	  		<table width="300" height="200" border="0" cellspacing="0" cellpadding="0">
	  		   <tr>
	  		   	  <td align="right" bgcolor="#E6F5FF">
	  		   	    <table width="100%" border="0" cellspacing="0" cellpadding="10">
	  		   	    	<tr>
	  		   	    		<td width="40%" align="right" valign="top">用户名：</td>
	  		   	    		<td>
	  		   	    		  <input type="text" name="username" size="15">
	  		   	    		</td>
	  		   	    	</tr>
	  		   	    	<tr>
	  		   	    		<td align="right">密码：</td>
	  		   	    		<td>
	  		   	    		  <input type="text" name="password" size="15">
	  		   	    		</td>
	  		   	    	</tr>
	  		   	    	<tr>
	  		   	    		<td colspan="2" align="center" >
	  		   	    		   	<img src="Images/b_logon.gif" style="cursor:pointer" onclick="check()">
	  		   	    		   	<img src="Images/b_reset.gif" style="cursor:pointer" onclick="reset()">
	  		   	    		</td>
	  		   	    	</tr>
	  		   	    </table>
	  		   	  </td>
	  		   </tr>
	  		</table>
  	     </form>
  	</center>
  </body>
  <script language="javascript">
  	function check(){
  	    var name = form1.username.value;
  	    var pwd = form1.password.value;
  		if(name==""){
  			alert("请输入用户名!");
  			return;
  		}else if(pwd==""){
  			alert("请输入密码!");
  			return;
  		}
  		else{
  			form1.submit();
  		}
  	}
  	
  	function reset(){
  		form1.reset();
  	}
  </script>
</html>
